package cn.minimelon.solon.utils;

import java.util.concurrent.atomic.AtomicInteger;

public class ShortIdGen {
    private static ShortIdGen instance;
    private static final AtomicInteger atomicInteger = new AtomicInteger(10001);

    private ShortIdGen() {
    }

    public static ShortIdGen getInstance() {
        if (instance == null) {
            instance = new ShortIdGen();
        }
        return instance;
    }

    public String getId() {
        return "REG" + "XXA" + atomicInteger.getAndIncrement();
    }
}
